package com.lantosec.hmrp.modules.internal.vo;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.modules.internal.entity.InternalLevel;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 评价等级定义 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="InternalLevel对象", description="评价等级定义")
public class InternalLevelVO extends BaseVO<InternalLevel> {
    private static final long serialVersionUID = 1L;


    public InternalLevelVO(InternalLevel entity){
        this.internalLevelId = entity.getInternalLevelId();
        this.internalLevelName = entity.getInternalLevelName();
        this.levelScore = entity.getLevelScore();
        this.necReason = entity.getNecReason();
    }

    @Override
    public InternalLevel convertToEntity(){
        return new InternalLevel(this);
    }


    @ApiModelProperty(value = "评价等级ID")
    @TableId(value = "internal_level_id", type = IdType.AUTO)
    private Integer internalLevelId;

    @ApiModelProperty(value = "评价等级名称")
    private String internalLevelName;

    @ApiModelProperty(value = "等级对应分值")
    private BigDecimal levelScore;

    @ApiModelProperty(value = "评价理由是否必填（0否1是）")
    private Integer necReason;
}
